From 88008890d4738aef5996d6d79f5a9f58021865bf Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Mon, 11 Dec 2006 15:06:53 +0000 Subject: [PATCH] [XEN] Remove unnecessary shadow_mode_refcount() code from PV mm code. Signed-off-by: Keir Fraser --- xen/arch/x86/mm.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 4fd69400f3..034f992643 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -435,15 +435,6 @@ int map_ldt_shadow_page(unsigned int off) return 0; okay = get_page_and_type(mfn_to_page(mfn), d, PGT_ldt_page); - - if ( !okay && unlikely(shadow_mode_refcounts(d)) ) - { - shadow_lock(d); - shadow_remove_write_access(d->vcpu[0], _mfn(mfn), 0, 0); - okay = get_page_and_type(mfn_to_page(mfn), d, PGT_ldt_page); - shadow_unlock(d); - } - if ( unlikely(!okay) ) return 0; @@ -509,8 +500,6 @@ get_linear_pagetable( struct page_info *page; unsigned long pfn; - ASSERT( !shadow_mode_refcounts(d) ); - if ( (root_get_flags(re) & _PAGE_RW) ) { MEM_LOG("Attempt to create linear p.t. with write perms"); @@ -821,8 +810,6 @@ static int alloc_l1_table(struct page_info *page) l1_pgentry_t *pl1e; int i; - ASSERT(!shadow_mode_refcounts(d)); - pl1e = map_domain_page(pfn); for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ ) @@ -873,8 +860,6 @@ static int create_pae_xen_mappings(l3_pgentry_t *pl3e) * 2. Cannot appear in another page table's L3: * a. alloc_l3_table() calls this function and this check will fail * b. mod_l3_entry() disallows updates to slot 3 in an existing table - * - * XXX -- this needs revisiting for shadow_mode_refcount()==true... */ page = l3e_get_page(l3e3); BUG_ON(page->u.inuse.type_info & PGT_pinned); @@ -959,8 +944,6 @@ static int alloc_l2_table(struct page_info *page, unsigned long type) l2_pgentry_t *pl2e; int i; - ASSERT(!shadow_mode_refcounts(d)); - pl2e = map_domain_page(pfn); for ( i = 0; i < L2_PAGETABLE_ENTRIES; i++ ) @@ -1008,8 +991,6 @@ static int alloc_l3_table(struct page_info *page) l3_pgentry_t *pl3e; int i; - ASSERT(!shadow_mode_refcounts(d)); - #ifdef CONFIG_X86_PAE /* * PAE pgdirs above 4GB are unacceptable if the guest does not understand @@ -1075,8 +1056,6 @@ static int alloc_l4_table(struct page_info *page) l4_pgentry_t *pl4e = page_to_virt(page); int i; - ASSERT(!shadow_mode_refcounts(d)); - for ( i = 0; i < L4_PAGETABLE_ENTRIES; i++ ) { if ( is_guest_l4_slot(i) && -- 2.30.2